home *** CD-ROM | disk | FTP | other *** search
- /****************************************************/
- /* */
- /* File: Imageer.protos.h */
- /* */
- /* Program: Imageer */
- /* */
- /* By: Jason Hodges-Harris */
- /* */
- /* Created: 26/10/95 00:00:00 AM */
- /* */
- /* Version: 1.0.0d3 */
- /* */
- /* Copyright: © 1995-96 Apple Computer, Inc., */
- /* all rights reserved. */
- /* */
- /****************************************************/
-
-
- #ifndef __IMAGEERPROTOSHEADER__
- #define __IMAGEERPROTOSHEADER__
-
-
- /**** Macintosh Toolbox Headers *****/
-
- #ifndef __IMAGECOMPRESSION__
- #include <ImageCompression.h>
- #endif
-
-
- /**** Application headers and prototypes ****/
-
-
- #ifndef __IMAGEERAPPHEADER__
- #include "Imageer.app.h"
- #endif
-
-
- /**** doevent.c prototypes ****/
-
- void DoEvent (EventRecord *EventPtr); // process event
- void HandleMouseDown(EventRecord *eventPtr); // handle mouse down events
- void DoDiskEvt(EventRecord *eventPtr); // handle disk inserted events
- OSErr ScrollBarHandler(Point Position, WindowPtr theWindow);
- void UpdateImageWindCntrl(ControlHandle theControlHndl, WindowPtr theWindow, short stepSize);
- pascal void ImageWindVertAction(ControlHandle theControl, short theControlPart);
- pascal void ImageWindHorizAction(ControlHandle theControl, short theControlPart);
-
-
- /**** eventloop.c prototypes ****/
-
- void EventLoop (void);
-
-
- /**** fileCache.c prototypes ****/
-
- OSErr FindTempFolder(void);
- OSErr RemoveTempFile(ImageDocHndl theDocHndl, Boolean delUndoFile, Boolean delRedoFile);
- OSErr SaveTempImageFile(ImageDocHndl theDocHndl, short tempFileOp);
- OSErr LoadTempImageFile(ImageDocHndl theDocHndl);
- OSErr SavePixMaptoTemp(ImageDocHndl theDocHndl, Boolean isRedoFile);
- OSErr LoadTemptoPixMap(ImageDocHndl theDocHndl, Boolean isRedoFile);
- OSErr SaveCTabtoTemp(ImageDocHndl theDocHndl, Boolean isRedoFile);
- OSErr LoadTemptoCTab(ImageDocHndl theDocHndl, Boolean isRedoFile);
-
-
- /**** fileIO.c prototypes ****/
-
- OSErr LoadSupportedImage(void);
- pascal short CustomGetFileHook(short item,DialogPtr theDlogPtr,void* theData);
- pascal Boolean CustomFileDlogFilter(CInfoPBPtr theParamBlok, Ptr theDataPtr);
- void GetTIFFHdrInfo(ImageDocHndl theDocHndl,TiffInfo *theTiffHeader);
- OSErr GetTIFFIFDirectory(ImageDocHndl theDocHndl, TiffInfo *theTiffHeader);
- OSErr LoadTiffToGWorld (ImageDocHndl theImageDocHndl, TiffInfoPtr theTiffInfo, short bitDepth);
- long SwapByteOrder(long theData,short theDataLength);
- PicHandle LoadPictImageFile(ImageDocHndl theDocHndl);
- OSErr DrawPictToGWorld (ImageDocHndl theDocHndl,PicHandle thePictHndl);
- OSErr SaveSupportedImageFile(ImageDocHndl theDocHndl);
- pascal short CustomPutFileHook(short item,DialogPtr theDlogPtr,void* theData);
- OSErr SavePictImage(ImageDocHndl theDocHndl, StandardFileReply* thePictFile);
- short ProcessPictCompDlog(void);
- void RemoveOldSaveData(ImageDescriptionHandle theImageDescH, Handle theDataH, PixMapHandle thePixMapHndl);
- void SaveGXShapeToFile(gxShape theShape, gxFlattenFlag theFlags, short fileRefNum);
- OSErr SaveQdGxShape(ImageDocHndl theDocHndl, StandardFileReply* thePictFile);
- OSErr LoadQdGxShape(ImageDocHndl theDocHndl, StandardFileReply* thePictFile);
- OSErr LoadGxFileToShape(ImageDocHndl theDocHndl, short theFileRefNum);
- static long FileSpoolProc(gxSpoolCommand command, UserGXSpool *dataBlock);
- OSErr RevertToSavedFile(ImageDocHndl theDocHndl, WindowPtr theWindow);
- void CleanLoadAbort(ImageDocHndl theDocHndl);
-
-
- /**** gxGraphics.c prototypes ****/
-
- OSErr ConvPixMapToGXShape(ImageDocHndl theDocHndl, WindowPtr theWindow);
- OSErr QDShapeSpooler (gxShape theShape, void *ref);
- OSErr CreateGXviewPorts(ImageDocHndl theDocHndl, WindowPtr theWindow);
- void UpdateGXObjectDisplay(ImageDocHndl theWindDocHndl, WindowPtr theWindow);
- void InitTransferMatrix (ImageDocHndl theDocHndl,
- gxComponentMode comp1TransferMode,
- gxComponentMode comp2TransferMode,
- gxComponentMode comp3TransferMode);
- OSErr RotateGxShape(ImageDocHndl theDocHndl, WindowPtr theWindow, Fixed angle);
- OSErr MirrorGxShape(ImageDocHndl theDocHndl, WindowPtr theWindow, Boolean isXaxis);
- OSErr GxShapeInkInvert (ImageDocHndl theDocHndl, WindowPtr theWindow);
- OSErr RGBColorComponent (ImageDocHndl theDocHndl, WindowPtr theWindow, short colorComponent);
- OSErr GxShapeInkBrightness (ImageDocHndl theDocHndl, WindowPtr theWindow, Boolean isBrighter);
- void CreateGXRect(gxRectangle* theGXRect, short top, short left, short bottom, short right);
- OSErr SaveTransformCopy(ImageDocHndl theDocHndl, Boolean isUndoOp);
- OSErr RestoreOldTransformCopy(ImageDocHndl theDocHndl, Boolean isUndoOp);
-
-
- /**** imageFilter.c prototypes ****/
-
- OSErr ImageSmoothFilter (ImageDocHndl theDocHndl, WindowPtr theWindow);
- OSErr ImageHiPassFilter (ImageDocHndl theDocHndl, WindowPtr theWindow);
- pascal Boolean InvertDirectColor(RGBColor *color,long *position);
- OSErr InvertColorTable(ImageDocHndl theDocHndl);
- OSErr ColorImageInverter (ImageDocHndl theDocHndl, WindowPtr theWindow);
- OSErr MirrorImageVertical(ImageDocHndl theDocHndl, WindowPtr theWindow);
- OSErr MirrorImageHorizontal(ImageDocHndl theDocHndl, WindowPtr theWindow);
- OSErr RotateImage180(ImageDocHndl theDocHndl, WindowPtr theWindow);
- OSErr ImageBrightness(ImageDocHndl theDocHndl, WindowPtr theWindow, Boolean isBrighter);
- OSErr ImageContrast(ImageDocHndl theDocHndl, WindowPtr theWindow, Boolean isGreater);
- pascal Boolean DirectColorBrightenProc(RGBColor *color,long *position);
- pascal Boolean DirectColorDarkenProc(RGBColor *color,long *position);
- void BrightnessColorTable(ImageDocHndl theDocHndl,Boolean isBrighter);
- pascal Boolean DirectColorIncContrastProc(RGBColor *color,long *position);
- pascal Boolean DirectColorDecContrastProc(RGBColor *color,long *position);
- void ContrastColorTable(ImageDocHndl theDocHndl,Boolean isGreater);
- OSErr RemoveColorComponent(ImageDocHndl theDocHndl, WindowPtr theWindow, short theColorComponent);
- pascal Boolean RemoveRedCompProc(RGBColor *color,long *position);
- pascal Boolean RemoveGreenCompProc(RGBColor *color,long *position);
- pascal Boolean RemoveBlueCompProc(RGBColor *color,long *position);
- void RemoveComponentColorTable(ImageDocHndl theDocHndl,short theColorComponent);
-
-
- /**** menu.c prototypes ****/
-
- void MenuBarInit (void);
- void DoAdjustMenus(void);
- void DoMenuCommand(long menuResult);
- void DoAdjustFileMenu(void);
- void DoAdjustEditMenu(void);
- void DoAdjustWindowsMenu(void);
- void DoAdjustFilterMenu(void);
- void DoAdjustEffectsMenu(void);
- void DoAdjustModelMenu(void);
- OSErr AddDocNameToMenu (ImageDocHndl theWindDocHndl);
- OSErr DeleteDocNameFromMenu (ImageDocHndl theWindDocHndl);
- OSErr RearrangeMenuItems(ImageDocHndl theWindDocHndl);
- OSErr SetCurrentWindowMark(WindowPtr theWindow);
- void AddSubMenu(short menuID);
- void DisableAllMenus(Boolean isDisabled);
- OSErr SetImagingModel(void);
- void SetUndoItemText(short canUndo);
- void SetMenuItemAvailable(Boolean isQDGX);
-
-
- /**** offscrnGraphics.c prototypes ****/
-
- GWorldPtr CreateOffscreen (CTabHandle myCTabHndl, short myXlength,
- short myYlength, short myBitDepth, GWorldFlags theFlags);
- OSErr DrawImageColors(WindowPtr theWindow);
- void ForceRestoreColors(void);
- OSErr TransferImageToWindow(ImageDocHndl theWindDocHndl, WindowPtr theWindow);
- Rect* CalcVisibleImage(ImageDocHndl theWindDocHndl,const Rect *destRect);
- void SaveSetMMUMode(Boolean isSaveMode);
- OSErr UpdateColorsWindPalette(ImageDocHndl theWindDocHndl, WindowPtr theImageWindow);
-
-
- /**** start.c prototypes ****/
-
- void InitialiseApp(void);
- Boolean TestforQuickDrawGX(void);
-
-
- /**** windows.c prototypes ****/
-
- long DisplayAlert (short dialogID,short errStrID,short StrIDindex);
- void DragSelWind(WindowPtr window,Point mouseLoc);
- void DoGoAwayWind(WindowPtr window,Point mouseLoc);
- OSErr CreateImageWindow (ImageDocHndl theWindDocHndl);
- void DisposeImageWindow (WindowPtr window);
- void DoWindowUpdate(WindowPtr theWindow);
- OSErr CreateColorsWindow(void);
- OSErr DisposeColorsWindow(void);
- OSErr CalcMaxImageWindowSize(ImageDocHndl theWindDocHndl);
- Point CalcNextWindowPosition(ImageDocHndl theDocHndl);
- void TestWindowFitMainScrn(ImageDocHndl theDocHndl, Point *windowOffset);
- void HandleWindowReSize(WindowPtr theWindow,Point startPoint);
- void DisplayProgressBarDlog(short updateState, short controlValue,
- short theStrGroup, short theStrID);
- void SplashScreen(short theDelayLength);
- Boolean ColorWindowVisible(void);
-
-
- #endif // __IMAGEERPROTOSHEADER__